/*
Copyright (C) 2009  Raymond Jeon
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/


#ifndef __GL_MAIL_USER_H__
#define __GL_MAIL_USER_H__


#include "gl_lib_include.h"
#include "gl_mail_define.h"


BOOL GlUserIdCheck(char *szId);
BOOL GlUserAdd(IN char *szMailHost, IN char *szId, IN char *szName, IN unsigned int uiSpace, IN char *szPath);
BOOL GlUserGet(IN char *szMailHost, IN char *szId, OUT char *szName, OUT char *szPwMD5, OUT unsigned int *uiSpace, OUT char *szPath);
BOOL GlUserBe(IN char *szMailHost, IN char *szId);
BOOL GlUserDel(IN char *szMailHost, IN char *szId);
BOOL GlUserEmailBe(IN char *szEmailAddress);

BOOL GlGetIdAndMailHostFromUser(char *szEmailorId, char *szId, char *szMailHost);

BOOL GlUserEmailorIdDel(IN char *szEmailorId);
BOOL GlUserEmailorIdDir(IN char *szEmailorId, OUT char *szPath);

BOOL GlUserEmailorIdDirSpace(IN char *szEmailorId, OUT unsigned int *uiSpace, OUT char *szPath);
BOOL GlUserEmailorIdGetPwDir(IN char *szEmailorId, IN char *szPw, OUT char *szPath);
BOOL GlUserEmailorIdSetPw(IN char *szEmailorId, IN char *szPw);
BOOL GlUserDirSetPw(IN char *szPath, IN char *szPw);

//BOOL GlAdminSetId(char *szId);
BOOL GlAdminSetPw(char *szPw);

#endif	// __GL_MAIL_USER_H__


